package com.cjl.generic;

import java.util.*;

public class LostInfo {
    static class WenZhang<POSITION,NAME>{}

    class Frob{}

    class Fnorkle {}

    static class Quark<Q> {}

    //泛型类的字节码中根本没有真正的类型，只有虚假的占位符。

    public static void main(String[] args) {
        List<Frob> list = new ArrayList<Frob>();
        Map<Frob,Fnorkle> map = new HashMap<Frob,Fnorkle>();
        Quark<Fnorkle> quark = new Quark<Fnorkle>();
        WenZhang<Long,Double> p = new WenZhang<Long,Double>();

        System.out.println(Arrays.toString(
                list.getClass().getTypeParameters()));

        System.out.println(Arrays.toString(
                map.getClass().getTypeParameters()));

        System.out.println(Arrays.toString(
                quark.getClass().getTypeParameters()));

        System.out.println(Arrays.toString(
                p.getClass().getTypeParameters()));


    }
}
